﻿                using System;
                using System.Collections.Generic;
                using System.ComponentModel;
                using System.Data;
                using System.Drawing;
                using System.Linq;
                using System.Text;
                using System.Windows.Forms;

                namespace SGE
                {
                    public partial class Form2 : Form
                    {
                        public Form2()
                        {
                            InitializeComponent();
                            comboBox1.Items.Add("A");
                            comboBox1.Items.Add("B");
                            comboBox1.Items.Add("C");
                            comboBox1.Items.Add("D");
                            comboBox1.Items.Add("E");
                        }

                        public Entregador GetEntregador() 
                       {
                        
                        Entregador c = new Entregador(int.Parse(textBox1.Text), textBox2.Text, comboBox1.SelectedItem.ToString(), textBox9.Text, richTextBox1.Text);
                        return c;
                                               
                       }

                        private void button2_Click(object sender, EventArgs e)
                        {
                            this.GetEntregador();
                            this.Limpar();
                        }

                        public void Limpar(){
                            textBox1.Clear();
                            textBox2.Clear();
                            textBox3.Clear();
                            textBox4.Clear();
                            textBox5.Clear();
                            textBox6.Clear();
                            textBox7.Clear();
                            textBox8.Clear();
                            textBox9.Clear();
                            richTextBox1.Clear();
                                                                                
                        }

                                         }
                }
